<?=$this->load->view('include_header',null)?>
<style type="text/css">
select { width:100px;}
</style>
	<title></title><div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/nz_ext_update/'.$cateid)?>">

	<h3>新西兰附表[INZ 1027]</h3>
    <table width="100%">
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
		<tr class="odd">
            <td>Full name (underline family name)</td>
        	<td colspan="4"><input type="text" name="name" value="<?= @$info->name?>"/></td>
        	</tr>
        <tr class="even">
            <td>Date of birth</td>
        	<td nowrap="nowrap"><input type="text" name="birth" id="birth" value="<?= @$info->birth?>"/></td>
        	<td>&nbsp;</td>
        	<td>Gender</td>
			<td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />Male 
        		<input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />Female</td>
        </tr>
		<tr class="odd">
            <td>Also known as/other name(s)</td>
        	<td colspan="4"><input type="text" name="alias" value="<?= @$info->alias?>"/></td>
        	</tr>
        <tr class="even">
            <td>Place of birth (eg Beijing)</td>
        	<td><input type="text" name="birth_city" value="<?= @$info->birth_city?>"/></td>
        	<td>&nbsp;</td>
        	<td>Citizenship</td>
			<td><input type="text" name="citizenship" value="<?= @$info->citizenship?>"/></td>
        </tr>
		<tr class="odd">
            <td>Country of birth (eg China)</td>
        	<td colspan="4"><input type="text" name="birth_country" value="<?= @$info->birth_country?>"/></td>
        	</tr>
        <tr class="even">
            <td colspan="2">Chinese Commercial Code and/or Chinese National ID Number</td>
        	<td colspan="3"><input type="text" name="national_id" value="<?= @$info->national_id?>" style="width:250px"/></td>
        	</tr>
		<tr class="odd">
            <td>Passport number</td>
        	<td colspan="4"><input type="text" name="passport_no" value="<?= @$info->passport_no?>" style="width:250px"/></td>
        	</tr>
        <tr class="even">
            <td>Date of issue</td>
        	<td><input type="text" name="passport_issue" id="passport_issue" value="<?= @$info->passport_issue?>"/></td>
        	<td>&nbsp;</td>
        	<td>Date of expiry</td>
			<td nowrap="nowrap"><input type="text" name="passport_expiry" id="passport_expiry" value="<?= @$info->passport_expiry?>"/></td>
        </tr>
		<tr class="odd">
            <td colspan="5"><strong>Applicant’s residential address and contact information</strong></td>
        	</tr>
        <tr class="even">
            <td>Flat No.</td>
        	<td><input type="text" name="app_flat" value="<?= @$info->app_flat?>"/></td>
        	<td>&nbsp;</td>
        	<td>Entrance No.</td>
			<td><input type="text" name="app_entrance" value="<?= @$info->app_entrance?>"/></td>
        </tr>
		<tr class="odd">
            <td>Building No.</td>
        	<td><input type="text" name="app_building" value="<?= @$info->app_building?>"/></td>
        	<td>&nbsp;</td>
        	<td>Street No.</td>
			<td><input type="text" name="app_street_no" value="<?= @$info->app_street_no?>"/></td>
        </tr>
        <tr class="even">
            <td>Complex name</td>
        	<td><input type="text" name="app_complex" value="<?= @$info->app_complex?>"/></td>
        	<td>&nbsp;</td>
        	<td>Street name</td>
			<td><input type="text" name="app_street" value="<?= @$info->app_street?>"/></td>
        </tr>
		<tr class="odd">
            <td>District</td>
        	<td><input type="text" name="app_district" value="<?= @$info->app_district?>"/></td>
        	<td>&nbsp;</td>
        	<td>City</td>
			<td><input type="text" name="app_city" value="<?= @$info->app_city?>"/></td>
        </tr>
        <tr class="even">
            <td>Province</td>
        	<td><input type="text" name="app_province" value="<?= @$info->app_province?>"/></td>
        	<td>&nbsp;</td>
        	<td>Telephone(s)</td>
			<td><input type="text" name="app_tel" value="<?= @$info->app_tel?>"/></td>
        </tr>
		<tr class="odd">
            <td>Email</td>
        	<td><input type="text" name="app_email" value="<?= @$info->app_email?>" id="app_email" /></td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
        <tr class="even">
            <td colspan="5"><strong>Applicant’s work (current) If retired or not working, provide details of last paid work.</strong></td>
        	</tr>
		<tr class="odd">
            <td>Occupation/job title</td>
        	<td colspan="4"><input type="text" name="job_title" value="<?= @$info->job_title?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Name of company/business</td>
        	<td colspan="4"><input type="text" name="job_name" value="<?= @$info->job_name?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Building name</td>
        	<td><input type="text" name="job_building" value="<?= @$info->job_building?>"/></td>
        	<td>&nbsp;</td>
        	<td>Street name and No.</td>
			<td><input type="text" name="job_street" value="<?= @$info->job_street?>"/></td>
        </tr>
        <tr class="even">
            <td>District</td>
        	<td><input type="text" name="job_district" value="<?= @$info->job_district?>"/></td>
        	<td>&nbsp;</td>
        	<td>City</td>
			<td><input type="text" name="job_city" value="<?= @$info->job_city?>"/></td>
        </tr>
		<tr class="odd">
            <td>Province</td>
        	<td><input type="text" name="job_province" value="<?= @$info->job_province?>"/></td>
        	<td>&nbsp;</td>
        	<td>Telephone(s)</td>
			<td><input type="text" name="job_tel" value="<?= @$info->job_tel?>"/></td>
        </tr>
        <tr class="even">
            <td>Email</td>
        	<td><input type="text" name="job_email" value="<?= @$info->job_email?>" id="job_email"/></td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
		<tr class="odd">
            <td colspan="5"><strong>Applicant’s previous tertiary education (if undertaken)</strong></td>
        	</tr>
        <tr class="even">
            <td>Name of institution</td>
        	<td colspan="4"><input type="text" name="edu_name" value="<?= @$info->edu_name?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Course and programme of study</td>
        	<td colspan="4"><input type="text" name="edu_course" value="<?= @$info->edu_course?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Dates of attendance</td>
        	<td colspan="4"><input type="text" name="edu_date" value="<?= @$info->edu_date?>"/></td>
        	</tr>
		<tr class="odd">
            <td colspan="5"><strong>Applicant’s military history (if applicable)</strong></td>
        	</tr>
        <tr class="even">
            <td>Rank</td>
        	<td><input type="text" name="military1_rank" value="<?= @$info->military1_rank?>"/></td>
        	<td>&nbsp;</td>
        	<td>Unit</td>
			<td><input type="text" name="military1_unit" value="<?= @$info->military1_unit?>"/></td>
        </tr>
		<tr class="odd">
            <td>Service</td>
        	<td><input type="text" name="military1_service" value="<?= @$info->military1_service?>"/></td>
        	<td>&nbsp;</td>
        	<td>Dates served</td>
			<td><input type="text" name="military1_date" value="<?= @$info->military1_date?>"/></td>
        </tr>
        <tr class="even">
            <td>Rank</td>
        	<td><input type="text" name="military2_rank" value="<?= @$info->military2_rank?>"/></td>
        	<td>&nbsp;</td>
        	<td>Unit</td>
			<td><input type="text" name="military2_unit" value="<?= @$info->military2_unit?>"/></td>
        </tr>
		<tr class="odd">
            <td>Service</td>
        	<td><input type="text" name="military2_service" value="<?= @$info->military2_service?>"/></td>
        	<td>&nbsp;</td>
        	<td>Dates served</td>
			<td><input type="text" name="military2_date" value="<?= @$info->military2_date?>"/></td>
        </tr>
        <tr class="even">
            <td colspan="5"><strong>Provide details of your parents, partner/spouse and children (even if they are not travelling with you)</strong></td>
        	</tr>
		<tr class="odd" align="center">
            <td colspan="2">Name (underline family name)</td>
        	<td colspan="2">Relationship to applicant</td>
        	<td>Date of birth</td>
        </tr>
        <tr class="even">
            <td colspan="2"><input type="text" name="dependent1_name" value="<?= @$info->dependent1_name?>" style="width:250px"/></td>
        	<td colspan="2"><input type="text" name="dependent1_relate" value="<?= @$info->dependent1_relate?>" style="width:250px"/></td>
        	<td><input type="text" name="dependent1_birth" id="dependent1_birth" value="<?= @$info->dependent1_birth?>"/></td>
        </tr>
		<tr class="odd">
            <td colspan="2"><input type="text" name="dependent2_name" value="<?= @$info->dependent2_name?>" style="width:250px"/></td>
        	<td colspan="2"><input type="text" name="dependent2_relate" value="<?= @$info->dependent2_relate?>" style="width:250px"/></td>
        	<td><input type="text" name="dependent2_birth" id="dependent2_birth" value="<?= @$info->dependent2_birth?>"/></td>
        </tr>
        <tr class="even">
            <td colspan="2"><input type="text" name="dependent3_name" value="<?= @$info->dependent3_name?>" style="width:250px"/></td>
        	<td colspan="2"><input type="text" name="dependent3_relate" value="<?= @$info->dependent3_relate?>" style="width:250px"/></td>
        	<td><input type="text" name="dependent3_birth" id="dependent3_birth" value="<?= @$info->dependent3_birth?>"/></td>
        </tr>
		<tr class="odd">
            <td colspan="2"><input type="text" name="dependent4_name" value="<?= @$info->dependent4_name?>" style="width:250px"/></td>
        	<td colspan="2"><input type="text" name="dependent4_relate" value="<?= @$info->dependent4_relate?>" style="width:250px"/></td>
        	<td><input type="text" name="dependent4_birth" id="dependent4_birth" value="<?= @$info->dependent4_birth?>"/></td>
        </tr>
        <tr class="even">
            <td colspan="5"><strong>Type of visa being applied for</strong></td>
        	</tr>
		<tr class="odd">
            <td colspan="5">
			<input type="radio" name="visa_type" value="1" <?= (@$info->visa_type==1)?'checked':''?> />Tourism/holiday 
			<input type="radio" name="visa_type" value="2" <?= (@$info->visa_type==2)?'checked':''?> />Business 
			<input type="radio" name="visa_type" value="3" <?= (@$info->visa_type==3)?'checked':''?> />Study 
			<input type="radio" name="visa_type" value="4" <?= (@$info->visa_type==4)?'checked':''?> />Visiting friends/relatives 
			<input type="radio" name="visa_type" value="5" <?= (@$info->visa_type==5)?'checked':''?> />
			To work in New Zealand <br />
			<input type="radio" name="visa_type" value="6" <?= (@$info->visa_type==6)?'checked':''?> />Conference 
			<input type="radio" name="visa_type" value="7" <?= (@$info->visa_type==7)?'checked':''?> />Other (specify)
			<input type="text" name="visa_type_other" value="<?= @$info->visa_type_other?>" style="width:250px"/></td>
        	</tr>
        <tr class="even">
            <td>Intended date of arrival</td>
        	<td><input type="text" name="intended_from" id="intended_from" value="<?= @$info->intended_from?>"/></td>
        	<td>&nbsp;</td>
        	<td>Intended date of departure</td>
			<td><input type="text" name="intended_to" id="intended_to" value="<?= @$info->intended_to?>"/></td>
        </tr>
		<tr class="odd">
            <td colspan="5"><strong>If visiting New Zealand for business purposes/a conference, please provide the following details</strong></td>
        	</tr>
        <tr class="even">
            <td>Name of person/organisation you are visiting or conference you are attending</td>
        	<td colspan="4"><input type="text" name="business_name" value="<?= @$info->business_name?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Address</td>
        	<td colspan="4"><input type="text" name="business_address" value="<?= @$info->business_address?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Telephone</td>
        	<td><input type="text" name="business_tel" value="<?= @$info->business_tel?>"/></td>
        	<td>&nbsp;</td>
        	<td>Email</td>
			<td><input type="text" name="business_email" value="<?= @$info->business_email?>" id="business_email"/></td>
        </tr>
		<tr class="odd">
            <td colspan="5"><strong>If coming to work in New Zealand, please provide the following details</strong></td>
        	</tr>
        <tr class="even">
            <td>Name of company/business</td>
        	<td colspan="4"><input type="text" name="work_name" value="<?= @$info->work_name?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Address</td>
        	<td colspan="4"><input type="text" name="work_address" value="<?= @$info->work_address?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Telephone</td>
        	<td><input type="text" name="work_tel" value="<?= @$info->work_tel?>"/></td>
        	<td>&nbsp;</td>
        	<td>Email</td>
			<td><input type="text" name="work_email" value="<?= @$info->work_email?>" id="work_email"/></td>
        </tr>
		<tr class="odd">
            <td colspan="5"><strong>If coming to New Zealand for study, please provide the following details</strong></td>
        	</tr>
        <tr class="even">
            <td>Name of institution</td>
        	<td colspan="4"><input type="text" name="study_name" value="<?= @$info->study_name?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Intended course of study</td>
        	<td colspan="4"><input type="text" name="study_course" value="<?= @$info->study_course?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Area of study (for postgraduate/Masters/PhD students please specify thesis topic)</td>
        	<td colspan="4"><input type="text" name="study_area" value="<?= @$info->study_area?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Course start date</td>
        	<td><input type="text" name="study_from" id="study_from" value="<?= @$info->study_from?>"/></td>
        	<td>&nbsp;</td>
        	<td>Course end date</td>
			<td><input type="text" name="study_to" id="study_to" value="<?= @$info->study_to?>"/></td>
        </tr>
        <tr class="even">
            <td colspan="5"><strong>Name and address of any New Zealand contacts (eg friends and family)</strong></td>
        	</tr>
		<tr class="odd">
            <td>Name</td>
        	<td colspan="4"><input type="text" name="friend1_name" value="<?= @$info->friend1_name?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Address</td>
        	<td colspan="4"><input type="text" name="friend1_address" value="<?= @$info->friend1_address?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Telephone</td>
        	<td><input type="text" name="friend1_tel" value="<?= @$info->friend1_tel?>"/></td>
        	<td>&nbsp;</td>
        	<td>Email</td>
			<td><input type="text" name="friend1_email" value="<?= @$info->friend1_email?>" id="friend1_email"/></td>
        </tr>
        <tr class="even">
            <td>Name</td>
        	<td colspan="4"><input type="text" name="friend2_name" value="<?= @$info->friend2_name?>" style="width:500px"/></td>
        	</tr>
		<tr class="odd">
            <td>Address</td>
        	<td colspan="4"><input type="text" name="friend2_address" value="<?= @$info->friend2_address?>" style="width:500px"/></td>
        	</tr>
        <tr class="even">
            <td>Telephone</td>
        	<td><input type="text" name="friend2_tel" value="<?= @$info->friend2_tel?>"/></td>
        	<td>&nbsp;</td>
        	<td>Email</td>
			<td><input type="text" name="friend2_email" value="<?= @$info->friend2_email?>" id="friend2_email"/></td>
        </tr>
		<tr class="odd">
            <td>&nbsp;</td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
        <tr class="even">
            <td>&nbsp;</td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		name:"required",
		sex:"required",
		birth:"required",
		birth_city:"required",
		birth_country:"required",
		national_id:"required",
		passport_no:"required",
		passport_issue:"required",
		passport_expiry:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);
	$("#birth").datepicker();
	$("#passport_expiry").datepicker();
	$("#passport_issue").datepicker();
	$("#dependent1_birth").datepicker();
	$("#dependent2_birth").datepicker();
	$("#dependent3_birth").datepicker();
	$("#dependent4_birth").datepicker();
	$("#intended_from").datepicker();
	$("#intended_to").datepicker();
	$("#study_from").datepicker();
	$("#study_to").datepicker();
	
	$("#app_email").autoMail();
	$("#job_email").autoMail();
	$("#business_email").autoMail();
	$("#work_email").autoMail();
	$("#friend1_email").autoMail();
	$("#friend2_email").autoMail();
	
	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>